export namespace commentsRes {
  export interface User {
    id: number
    name: string
    mail: string
    phone: string
    wechat: string
    qq: string
    role: string
    createTime: Date
    updateTime: Date
  }

  export interface Comment {
    id: number
    articleId: number
    fromUserId: number
    content: string
    createTime: Date
    updateTime: Date
    user: User
    replyCount: number
  }

  export interface Data {
    comments: Comment[]
    totalCount: number
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}

export namespace createCommentRes {
  export interface Comment {
    articleId: number
    content: string
    fromUserId: number
    id: number
    createTime: Date
    updateTime: Date
  }

  export interface Data {
    comment: Comment
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}

export namespace createCommentReplyRes {
  export interface Reply {
    commentId: number
    content: string
    replyId: number | null
    fromUserId: number
    permission: number
    toUserId: number
    id: number
    createTime: Date
    updateTime: Date
  }

  export interface Data {
    reply: Reply
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}

export namespace replysRes {
  export interface FromUser {
    id: number
    name: string
    mail: string
    phone: string
    wechat: string
    qq: string
    role: string
    createTime: Date
    updateTime: Date
  }

  export interface ToUser {
    id: number
    name: string
    mail: string
    phone: string
    wechat: string
    qq: string
    role: string
    createTime: Date
    updateTime: Date
  }

  export interface Reply {
    id: number
    commentId: number
    replyId?: any
    content: string
    fromUserId: number
    toUserId: number
    createTime: Date
    updateTime: Date
    fromUser: FromUser
    toUser: ToUser
  }

  export interface Data {
    replys: Reply[]
    totalCount: number
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}
